1. Field of the Invention
The present invention relates to a motion image encoder which selectively performs intraframe coding and interframe coding of blocks forming each of consecutively transmitted frames representing motion images and, in particular, to a motion image encoder which performs intraframe coding of particular blocks of each frame as xe2x80x9crefreshxe2x80x9d for reducing failure of image decoding.
2. Description of the Related Art
Since motion images include a large amount of data, it is effective to reduce redundancy of data for efficient transmission and reception of the motion images. In view of this, the intraframe coding and the interframe coding have been carried out.
In the intraframe coding, the redundancy of data is lessened within each of the frames, while, in the interframe coding, the redundancy of data is lessened between two consecutive frames. According to the intraframe coding, a decoder decodes one frame independently of results of decoding of any preceding frames. In contrast, according to the interframe coding, a decoder decodes one frame relying on results of decoding of all preceding frames. For example, if decoding of one interframe-coded frame fails, all frames subsequent to that frame are subjected to an influence of that failure. Accordingly, the decoder can not reproduce images as expected by an encoder.
Accordingly, for preventing the failure of one frame from continuously affecting decoding of the subsequent frames, the intraframe coding is cyclically executed. The intraframe coding executed for this purpose is called xe2x80x9crefreshxe2x80x9d. The refresh is described in, for example, U.S. patent application Ser. No. 08/924,262 entitled xe2x80x9cPICTURE CODING METHOD AND PICTURE CODERxe2x80x9d filed on Sep. 5, 1997 by Yasuko MATSUMURA et al (Oki Electric Industry Co., Ltd.), and xe2x80x9cVideo Coding Method with Cell Loss Resilience on ATM Networksxe2x80x9d by MACHIDA et al., The Institute of Electronics Information and Communication Engineers of Japan(PSCJ), pp. 205-208, October 1992.
There is Recommendation ITU-T/H. 261 for the motion image coding. The Recommendation proposes to divide a frame into a plurality of blocks each including a given number of pixels and perform the intraframe coding or the interframe coding per block. This means that the refresh is carried out on a block basis.
In general, the interframe coding can reduce the redundancy of data more effectively than the intraframe coding. Specifically, a data amount of an interframe-coded block is smaller than that of an intraframe-coded block. Therefore, it is desirable that the frequency of the refresh, i.e. the intraframe coding, be smaller.
Heretofore, however, the refresh has been cyclically performed according to a rule regulating order of blocks to be refreshed. Therefore, even though a magnitude of image variation between corresponding blocks of consecutive frames is small so that a possibility of failure in block decoding is also small, the refresh has been carried out, or even though a magnitude of image variation therebetween is large so that a failure possibility is also large, the refresh has not been carried out. In other words, the refresh has been executed more than necessity, or the refresh has not been executed sufficiently. This deteriorates the efficiency of the block coding and decoding.
Therefore, it is an object of the present invention to provide an improved motion image encoder which can overcome the foregoing problem.
According to one aspect of the present invention, there is provided a motion image encoder which selectively performs intraframe coding and interframe coding of blocks forming each of consecutively transmitted frames representing motion images, the motion image encoder comprising a deriving section which sequentially derives image variation magnitudes per block, each of the image variation magnitudes derived between corresponding blocks of two consecutive frames; an accumulating section which accumulates the image variation magnitudes to derive an image variation cumulative value per block; a selecting section which, based on the image variation cumulative values for the respective blocks, selects at least one of the blocks to be applied with the intraframe coding; and a coding section which applies the intraframe coding to the at least one of the blocks.
It may be arranged that the selecting section selects the at least one of the blocks whose corresponding image variation cumulative value is the greatest among the image variation cumulative values.
It may be arranged that the selecting section selects those blocks whose corresponding image variation cumulative values are larger among the image variation cumulative values.
It may be arranged that the selecting section selects the at least one of the blocks whose corresponding image variation cumulative value is greater than a threshold value.
It may be arranged that the selecting section selects those blocks whose corresponding image variation cumulative values are greater than a threshold value.
It may be arranged that the motion image encoder further comprises a sorting section which sorts the image variation cumulative values in given order, wherein the selecting section selects the at least one of the blocks based on the image variation cumulative values sorted by the sorting section.
It may be arranged that the selecting section stores a rule regulating order of the blocks to be applied with the intraframe coding, and selects the at least one of the blocks based on the image variation cumulative values and the rule.